#define _CRT_SECURE_NO_WARNINGS 1
#include "Tree.h"

BTNode* buynode(BTDataType x)
{
	BTNode* newnode = (BTNode*)malloc(sizeof(BTNode));
	if (newnode == NULL)
	{
		perror("malloc fail!");
		exit(1);
	}
	newnode->data = x;
	newnode->left = newnode->right = NULL;

	return newnode;
}
void test01()
{
	BTNode* node1 = buynode(1);
	BTNode* node2 = buynode(2);
	BTNode* node3 = buynode(3);
	BTNode* node4 = buynode(4);

	node1->left = node2;
	node1->right = node3;
	node2->left = node4;

	BTNode* plist = node1;
	PreOrder(plist);

}



int main()
{
	test01();
	return 0;
}